<?php defined("_JEXEC") or die("Acesso restrito") ?>

<fieldset>
<legend>Contatos:</legend>
<div id="editcell">
	<table class="lista">
		<thead>
			<tr>
				<th width="30%">
					<?php echo JText::_('Tipo'); ?>
				</th>
				<th width="70%">
					<?php echo JText::_('Número'); ?>
				</th>
			</tr>
		</thead>

		<?php
		for ($i = 0; $i < count($this->registrosTelefones); $i++) {
			$row = & $this->registrosTelefones[$i];
			$link = JRoute::_("index.php?option=com_sgrh&idPessoa={$row->id}");
			?>
			<tr class="<?php echo "row" . ($i % 2); ?>">
				<td>
					<?php echo $row->telefone; ?>
				</td>
				<td>
					<?php 
					switch($row->tipo){
						case 1;
							echo 'Residencial';
						break;
						case 2;
							echo 'Celular';
						break;
						case 3;
							echo 'Comercial';
						break;
						case 4;
							echo 'Outros';
						break;
						default:
							echo 'Erro';
						break;
					}
					?>
				</td>
			</tr>
			<?php
		}
		?>
	</table>
</div>
</fieldset>